package org.onvivals.module.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 数据字典
 */
@Schema(description="数据字典")
@Data
@TableName(value = "sys_dict")
public class SysDict implements Serializable {
    /**
     * ID
     */
    @TableId(value = "dict_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    @Schema(description="ID")
    private Long dictId;

    /**
     * 字典名称
     */
    @TableField(value = "`name`")
    @Schema(description="字典名称")
    private String name;

    /**
     * 描述
     */
    @TableField(value = "description")
    @Schema(description="描述")
    private String description;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    @Schema(description="创建人")
    private String createBy;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    @Schema(description="修改人")
    private String updateBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @Schema(description="创建时间")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @Schema(description="修改时间")
    private Date updateTime;

    /**
     * 0表示未删除,1表示删除
     */
    @TableField(value = "del_flag")
    @Schema(description="0表示未删除,1表示删除")
    private Integer delFlag;

    private static final long serialVersionUID = 1L;
}
